<template>
    <el-dialog
      width="40%"
      title="预览"
      :visible.sync="innerVisible"
      append-to-body>
      <img :src="preSrc" alt="" v-if="preType!='video'">
      <video src="" v-else controls></video>
    </el-dialog>
</template>
<script>
export default {
    data(){
        return{
            innerVisible:false,
            preType:'',
            preSrc:''
        }
    }
}
</script>
<style lang="less" scoped>
img{
    width: 100%;
    height: 500px;
}
video{
    width: 100%;
    height: 300px;
}
</style>